package org.sy.lab.多线程基础._4_执行器._2_Future线程控制._5_控制任务的完成;

import java.util.concurrent.Callable;
import java.util.concurrent.FutureTask;

public class MyFuture extends FutureTask<String> {

	public MyFuture(Callable<String> callable) {
		super(callable);
	}
	
	@Override
	protected void done() {
		if(isCancelled()) {
			System.out.println("cancel");
		} else {
			System.out.println("done");
		}
	}
}
